<!-- dialog -->
<template>
     <div>
      <el-dialog
            title="企业详情"
            :visible.sync="visible"
            :modal-append-to-body='false'
            @close="$emit('update:show', false)"
           >
            <el-descriptions direction="vertical" :column="4" border>
                <el-descriptions-item label="企业名称" :span="4">{{detailRow.name}}</el-descriptions-item>
                <el-descriptions-item label="企业头像" :span="2" >
                    <img :src="detailRow.enterpriseAvatar" alt="暂无">
                </el-descriptions-item>
                <el-descriptions-item label="企业背景图" :span="2">
                    <img :src="detailRow.enterpriseBgImage" alt="暂无">
                </el-descriptions-item>
                <el-descriptions-item label="联系电话" :span="2">{{detailRow.phone}}</el-descriptions-item>
                <el-descriptions-item label="企业账号">
                    <el-tag size="small">{{detailRow.account}}</el-tag>
                </el-descriptions-item>
                <el-descriptions-item label="企业注册时间">{{detailRow.createTime}}</el-descriptions-item>
                <el-descriptions-item label="联系人">
                    <el-tag size="small">{{detailRow.leader}}</el-tag>
                </el-descriptions-item>
                <el-descriptions-item label="公司员工数" :span="2">
                    <el-tag size="small">{{detailRow.employeeCount ? detailRow.employeeCount : '未知'}}</el-tag>
                </el-descriptions-item>
                <el-descriptions-item label="企业邮箱" :span="4">{{detailRow.email}}</el-descriptions-item>
                <el-descriptions-item label="联系地址" :span="4">{{detailRow.address}}</el-descriptions-item>
                <el-descriptions-item label="公司简介" :span="4">&emsp;&emsp;{{detailRow.introduction ? detailRow.introduction : '暂无'}}</el-descriptions-item>
           </el-descriptions>
            
        </el-dialog>
    </div>

</template>

<script>
export default {
    data () {
        return {
            visible: this.show,
        };
    },
    props: {
        show: {
            type: Boolean,
            default: false
        },
        detailRow: {
            type: Object,
            require: true,
        }
    },
    watch: {
        show () {
            this.visible = this.show;
        }
    },
}
</script>

<style scoped>
img{
    width: 100px;
    height: 100px;
    border-radius: 2px;
}
</style>
